import {defineStore} from "pinia"
import {ref,computed} from "vue"

export const useCounterStore = defineStore('counter', () => {
	const count = ref(1);
	const doubleCount = computed(()=>{
		return count.value * 2;
	})
		
	function addCount() {
		count.value++;
	}

	return { count,doubleCount, addCount };
});